package com.xls.app.service.impl;

import com.xls.app.bean.Users;
import com.xls.app.dao.UserDao;
import com.xls.app.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public List<Users> listPageUsers(Integer page, Integer size, String uname) {
        return userDao.listPage((page-1)*size,size,uname);
    }

    @Override
    public int countUsers(String uname) {
        return userDao.count(uname);
    }
}
